package cn.xopencode.recordservice.convert.sf6machine;

import cn.xopencode.common.framework.vo.PageResult;
import cn.xopencode.recordservice.dal.mysql.dataobject.sf6machine.Sf6MachineRecordDetailDO;
import cn.xopencode.recordservice.dal.mysql.dataobject.sf6machine.Sf6MachineRecordOtherDO;
import cn.xopencode.recordservice.rpc.sf6machine.dto.*;
import cn.xopencode.recordservice.rpc.sf6machine.vo.Sf6MachineRecordNextVO;
import cn.xopencode.recordservice.rpc.sf6machine.vo.Sf6MachineRecordPageVO;
import cn.xopencode.recordservice.rpc.sf6machine.vo.Sf6MachineRecordVO;
import cn.xopencode.recordservice.service.sf6machine.bo.Sf6MachineRecordBO;
import cn.xopencode.recordservice.service.sf6machine.bo.Sf6MachineRecordNextCreateBO;
import cn.xopencode.recordservice.service.sf6machine.bo.Sf6MachineRecordOtherPageBO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

@Mapper
public interface Sf6MachineRecordConvert {

    Sf6MachineRecordConvert INSTANCE = Mappers.getMapper(Sf6MachineRecordConvert.class);

    Sf6MachineRecordOtherPageBO convert(Sf6MachineRecordDTO dto);

    Sf6MachineRecordBO convert(Sf6MachineRecordCreateDTO createDTO);

    Sf6MachineRecordBO convert(Sf6MachineRecordUpdateDTO createDTO);

    Sf6MachineRecordNextCreateBO convert(Sf6MachineRecordNextCreateDTO nextCreateBO);

    Sf6MachineRecordNextCreateBO convert(Sf6MachineRecordNextUpdateDTO nextCreateBO);

    Sf6MachineRecordDetailDO convert(Sf6MachineRecordNextCreateBO nextCreateBO);

    Sf6MachineRecordOtherDO convert(Sf6MachineRecordBO recordBO);

    Sf6MachineRecordDetailDO convert2(Sf6MachineRecordBO recordBO);

    Sf6MachineRecordVO convert(Sf6MachineRecordOtherDO otherDO);

    @Mapping(source = "id", target = "recordDetailId")
    Sf6MachineRecordNextVO convert(Sf6MachineRecordDetailDO detailDO);

    PageResult<Sf6MachineRecordPageVO> convertPage(IPage<Sf6MachineRecordOtherDO> otherDOIPage);
}
